import com.alibaba.fastjson.JSONObject;
import com.ibest.base.IBestDataServerMain;
import com.ibest.base.service.RedisService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.redisson.api.RMap;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Optional;

@RunWith(SpringJUnit4ClassRunner.class)
//// 指定我们SpringBoot工程的Application启动类，新版本的使用的是@SpringBootTest
@SpringBootTest(classes = IBestDataServerMain.class)
public class MainTest01 {

    @Resource
    private RedisService redisService;

    @Test
    public void test(){

        Object data=redisService.getCanalBinlogBean("source_db","customer", Arrays.asList("17"));
        System.out.println((JSONObject)data);
    }

}
